/**
 * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.md or http://ckeditor.com/license
 */

CKEDITOR.editorConfig = function( config ) {
	// Define changes to default configuration here. For example:
	// config.language = 'fr';
	// config.uiColor = '#AADC6E';
	config.toolbar = [
        { name: 'document', groups: [ 'mode', 'document', 'doctools' ], items: [ 'Source', '-', 'Save', 'Preview', '-', 'Templates' ] },
        { name: 'basicstyles', groups: [ 'basicstyles' ], items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript' ] },
        { name: 'colors', items: [ 'TextColor', 'BGColor' ] },
        { name: 'links', items: [ 'Link', 'Unlink', 'Anchor', 'Codejump' ] },
        '/',
        { name: 'styles', items: [ 'Format', 'FontSize' ] },
        { name: 'paragraph', groups: [ 'indent', 'align' ], items: [ 'Outdent', 'Indent', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] },
        { name: 'insert', items: [ 'Image', 'Video', 'Audio', 'SpecialChar' ] },
        ];

	// Simplify the dialog windows.
	config.removeDialogTabs = 'image:advanced;link:advanced';
	
	config.allowedContent = true;
	
	// Loading plugin
	config.extraPlugins = 'codejump,video,audio';
	
	config.filebrowserUploadUrl = $.ctx + "/common/file/ckUpload";
	config.filebrowserImageUploadUrl = $.ctx + "/common/file/ckUpload?TYPE=Image";
	config.filebrowserVideoUploadUrl = $.ctx + "/common/file/ckUpload?TYPE=Video";
	config.filebrowserAudioUploadUrl = $.ctx + "/common/file/ckUpload?TYPE=Audio";

};
